package com.study.dao;


import com.study.bean.Blog;
import com.study.bean.BlogQuery;

import java.sql.SQLException;
import java.util.List;

public interface IBlogDao {

    List<Blog> selectAll() throws SQLException;


    List<Blog> selectByPage(int offset, Integer limit) throws SQLException;
    List<Blog> selectByPage(BlogQuery blogQuery) throws SQLException;

    int selectTotalCount() throws SQLException;
    int selectTotalCount(BlogQuery blogQuery) throws SQLException;

    void deleteById(int id) throws SQLException;

    void add(Blog blog) throws SQLException;

    Blog selectById(int id) throws SQLException;

    void update(Blog blog) throws SQLException;
}
